import request from '@/utils/request'

// 查询机构数据
export function getPartner(query) {
  return request({
    url: '/partner/find',
    method: 'get',
    params: query
  })
}

// 查询机构数据
export function getPartnerTree(query) {
  return request({
    url: '/partner/tree',
    method: 'get',
    params: query
  })
}

// 同步机构数据
export function refresh(data) {
  return request({
    url: '/partner/refresh',
    method: 'post',
    data: {
      idList: data
    }
  })
}

//自定义同步机构
export function refreshCustom(data) {
  return request({
    url: '/partner/refresh/custom',
    method: 'post',
    data: data
  })
}

//自定义同步机构
export function deletePartner(data) {
  return request({
    url: '/partner/delete',
    method: 'delete',
    data: {
      idList: data
    }
  })
}
